package com.demo.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * spu图片
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("pms_spu_images")
public class SpuImages implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** spu_id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`spu_id`")
	private Long spuId;

	/** 图片名 */
	@TableField(value = "`img_name`")
	private String imgName;

	/** 图片地址 */
	@TableField(value = "`img_url`")
	private String imgUrl;

	/** 顺序 */
	@TableField(value = "`img_sort`")
	private Integer imgSort;

	/** 是否默认图 */
	@TableField(value = "`default_img`")
	private Byte defaultImg;

}
